import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import router from "@/router/index";

NProgress.configure({showSpinner: false});

router.beforeEach((to, from, next) => {
    NProgress.start()
    let {title} = to.meta;
    // 更新窗口Title
    document.title = title;
    next();
})

router.afterEach(() => {
    NProgress.done()
})
